package com.yongchun.pubInter;


/**
 * @author sunke
 * @Date 2019-09-09 16:31:10
 * @description 业务异常枚举
 */

public enum BusinessExceptionEnum implements ExceptionEnum<BusinessExceptionEnum> {

    SYSTEM_ERROR(10, "system.error", "系统异常"),
    NOT_FIND_PAGE(10 + 5, "not.find.page", "该网页无法打开"),
    OBJ_NULL_ERROR(10 + 10, "obj.null.error", "对象空"),
    EMPTY_ERROR(10 + 15, "empty.error", "空字符"),
    RIGHTS_NO_ERROR(10 + 20, "rights.no.error", "无权限操作"),
    TOKEN_NULL(10 + 25, "token.null", "token不存在或过期"),
    FILE_FORMAT_ERROR(10 + 30, "file.format.error", "文件格式有误"),
    FILE_NULL_ERROR(10 + 35, "file.null.error", "文件为空"),
    FILE_UPLOAD_LENGTH_ERROR(10 + 36, "file.upload.length.error", "文件上传异常"),
    FILE_TOO_LARGE(10 + 37, "file.too.large", "文件大小超过2M"),
    EXIST(10 + 40, "EXIST", "已存在"),
    ID_EMPTY(10 + 50, "id.empty", "主键为空"),
    ENTITY_EXT_EMPTY(10 + 60, "entity.ext.empty", "分页内容对象为空"),
    SERVICE_EMPTY(10 + 70, "service.empty", "service为空"),
    PAGE_VO_EMPTY(10 + 80, "page.vo.empty", "分页内容包装对象为空"),
    SEARCH_EMPTY(10 + 90, "search.empty", " 搜索对象为空"),
    VO_EMPTY(10 + 100, "vo.empty", " 对象为空"),
    PLAYER_IS_EMPTY(10 + 110, "player.is.empty", " 用户为空"),
    PASSWORD_IS_ERROR(10 + 110, "password.is.error", "密码有误"),
    AGENTER_IS_NOT_EMPTY(10 + 120, "agenter.is.not.empty", "推广员已存在"),
    AGENTER_IS_EMPTY(10 + 130, "agenter.is.empty", "推广员不存在"),
    AGENTER_LEVEL_EMPTY(10 + 180, "agenter.level.empty", "请设置推广员等级"),
    AGENTER_REWARD_RATE_NULL(10 + 180, "agenter.reward.rate.null", "请设置推广员提成比例"),
    NOT_LOGIN(10 + 130, "not.login", "暂无登录"),
    MAXIMUN_CAN_CASH_MONEY(10 + 140, "maximun.can.cash.money", "超过最大可提现金额"),
    PASSWORD_IS_NOT_EQUAL(10 + 150, "password.is.not.equal", "两次密码不一致"),
    OUT_MONEY_IS_EMPTY(10 + 160, "out.money.is.empty", "提现费用必填"),
    OUT_MONEY_IS_HEIGHT(10 + 190, "out.money.is.height", "提现费用不足"),
    CHECK_INFO_IS_EMPTY(10 + 170, "check.info.is.empty", "审批不通过时请说明原因"),
    OUT_MONEY_NOT_ENOUGH(10 + 160, "out.money.not.enough", "可提现金额不足"),
    PAY_STATUS_IS_ERROR(10 + 170, "pay.status.is.error", "申请状态有误"),

    AGENT_SET_TIME_NULL(10 + 180, "agent.set.time.null", "时间未设置"),
    AGENT_SET_TIME_MIN(10 + 180, "agent.set.time.min", "当前时间超过活动开始时间"),
    AGENT_SET_TIME_ERROR(10 + 180, "agent.set.time.error", "活动结束时间必须大于开始时间"),
    AGENT_SET_TIME_OVERLAP(10 + 190, "agent.set.time.overlap", "时间设置重叠"),

    ACTIVE_IS_BEGIN(10 + 200, "active.is.begin", "活动已经开始"),
    ACTIVE_IS_NULL(10 + 230, "active.is.null", "活动不存在"),
    AGENT_SET_TIME_OVER(10 + 210, "agent.set.time.over", "今天已经有一场未过期的比赛，若要继续添加请将当天的比赛设置为过期"),
    SCAN_NOT_LOGIN(10 + 30000, "scan.not.login", "未登录"),

    SGJ_USER_NULL(10+240, "sgj.user.null", "水果机用户不存在"),
    SGJ_Task_NULL(10+250, "sgj.task.null", "水果机任务不存在"),
    SGJ_SIGN_ERROR(10+260, "sgj.sign.error", "资金发放签名有误"),
    ;


    private int code;
    private String key;

    public void setMessage(String message) {
        this.message = message;
    }

    private String message;

    BusinessExceptionEnum(int code, String key, String message) {
        this.code = code;
        this.key = key;
        this.message = message;
    }


    @Override
    public int getCode() {
        return code;
    }

    public void setCode(int code) {
        this.code = code;
    }

    @Override
    public String getKey() {
        return key;
    }

    public void setKey(String key) {
        this.key = key;
    }

    @Override
    public String getMessage() {
        return message;
    }


}
